import Vue from 'vue'
import Router from 'vue-router'
// import HelloWorld from '@/components/HelloWorld'
import Home from '@/pages/Home.vue'
// 懒加载方式，当路由被访问的时候才加载对应组件
const Login = resolve => require(['@/pages/Login.vue'], resolve)

Vue.use(Router)

let router =  new Router({
  routes: [{
    path: '/',
    name: 'Login',
    component: Login
  },
  {
    path:'/login',
    name: 'Login',
    component: Login
  }  
  ,
  {
    path: '/home',
    name: 'Home',
    component: Home
  }
  ]
})

export default router